home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Graphics / Misc / Wood.0.72 / Sources / WoodApp_OOE.m < prev    next >
Encoding:
Text File  |  1995-07-30  |  918 b   |  57 lines

  1.  
  2. #import "wooddoc.h"
  3.  
  4. #define OOE_SERVER_NAME    "Wood_OOE_Server"
  5.  
  6. @implementation WoodApp (OOE)
  7.  
  8. - registerAsOOEServer;
  9. {
  10.     id aConnection;
  11.     
  12.     aConnection = [NXConnection registerRoot: self
  13.                 withName: OOE_SERVER_NAME];
  14.     //[aConnection registerForInvalidationNotification:self];            
  15.     [aConnection runFromAppKit];         
  16.     return self;
  17. }
  18.  
  19. - senderIsInvalid:sender;
  20. {
  21.     return self;
  22. }
  23.  
  24. - OOE_newDocument:client;
  25. {
  26.     id doc;
  27.     
  28.     doc = [[[self docClass] allocFromZone:[self newDocZone]] initNewOOE:client];
  29.     return doc;
  30. }
  31.  
  32. - OOE_openDocument:client;
  33. {
  34.     id doc;
  35.  
  36.     doc = [[[self docClass] allocFromZone:[self newDocZone]] initOOE:client];
  37.     [[doc window] display];
  38.     return doc;
  39. }
  40.  
  41. - reportOOEProblem: (const char *)title
  42.     format: (const char * ) format, ...;
  43. {
  44.     va_list a; 
  45.     char alert[2048];
  46.  
  47.     va_start(a, format);
  48.     vsprintf(alert, format, a);
  49.     va_end(a);
  50.     NXRunAlertPanel(title, alert, "OK", NULL, NULL);
  51.     return self;
  52. }
  53.  
  54. @end
  55.  
  56.  
  57.